package kpi.java_training.utils;

import java.io.File;

/**
 * Created by Alex Kebkalo (kebka@mail.ru) on 26.11.13.
 * Class which defines name for input and output files
 */
public class UserSavedData {

    private String userName;

    public UserSavedData(String userName) {
        this.userName = userName;
    }

    public String getUserFileName() {
        return String.format("%s.%s", userName, XmlConstants.USER_FILE_EXTENSION);
    }

    public String getDefaultFileName() {
        return XmlConstants.DEFAULT_QUESTIONS_FILE;
    }

    public boolean savedDataExists() {
        File f = new File(getUserFileName());
        return f.exists();
    }
}
